﻿@model BookClubPortal.Models.Book

@{
    ViewBag.Title = "Delete";
}

<h2>Delete</h2>

<h3>Are you sure you want to delete this?</h3>
<fieldset class="details-listing">
    <legend>Book</legend>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Title)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Title)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Author)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Author)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.ReleaseYear)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ReleaseYear)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Description)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Description)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.ImageURL)
    </div>
    <div class="display-field">
        <a href="@Model.ImageURL" target="_blank"><img src="@Model.ImageURL" alt="@Model.Title" onerror="AltImage(this,'@Url.Content("~/Content/Images/logo.png")')" width="50" height="50"></a></text>
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.GenreId)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Genre.Name)
    </div>

    
</fieldset>
@using (Html.BeginForm()) {
    <p>
        <input type="submit" value="Delete" /> |
        @Html.ActionLink("Back to List", "Index")
    </p>
}


@section Scripts {
    @Scripts.Render("~/bundles/tools")
}